
import {createRouter as _createRouter, createWebHistory} from 'vue-router';
import course from "../views/course/course.vue";
import home from "../views/home/home.vue";
import addTask from "../views/home/addTask.vue";
import news from "../views/home/news.vue"
import encyclopedia from "../views/home/encyclopedia.vue";
import reference from "../views/home/reference.vue"
import question from "../views/home/question.vue";
import look from "../views/home/look.vue";
import information from "../views/home/information.vue"
import search from "../views/home/search.vue"
import clockIn from "../views/home/clockIn.vue"
import newsDetails from "../views/home/newsDetails.vue"
import resetPassword from '../views/my/resetPassword.vue'
import errorQuestions from "../views/home/errorQuestions.vue"
import collectQuestions from "../views/home/collectQuestions.vue";
import my from "../views/my/my.vue"
import myCache from "../views/my/myCache .vue"
import followPage from "../views/my/followPage.vue"
import circle from "../views/circle/circle.vue"
import envent from "../views/circle/envent.vue"
import project from "../views/circle/project.vue";
import browsingHistory from "../views/my/browsingHistory.vue"
import personalHome from '../views/my/personalHome.vue'
import personalHomeCopy from '../views/my/personalHomeCopy.vue'
import myCreate from '../views/my/myCreate.vue'
import myCourse from '../views/my/myCourse.vue'
import myCollect from '../views/my/myCollect.vue'
import dynanic from '../views/my/dynanic.vue'
import studentReport from '../views/my/studentReport.vue'
import clickInRecord from '../views/home/clickInRecord.vue'
import register from "../views/login/register.vue"
import drafts from '../views/my/drafts.vue'
import OpenCourse from "../views/course/OpenCourse.vue";
import OnlineCourse from "../views/course/OnlineCourse.vue";
import OfflineCourse from "../views/course/OfflineCourse.vue";
import login from "../views/login/login.vue";
import articleDetails from "../views/study/articleDetails.vue";
import messageList from "../views/my/messageList.vue";
import orderList from "../views/my/orderList.vue";
import orderDetail from "../views/my/orderDetail.vue";
import orderListUpdate from "../views/my/orderListUpdate.vue";
import questionList from "../views/my/questionList.vue";
import AddressList from "../views/course/AddressList.vue";
import AddressNew from "../views/course/AddressNew.vue";
import OrderAck from "../views/course/OrderAck.vue";
import createArticle from "../views/study/createArticle.vue";
import helpDetails from "../views/circle/helpDetails.vue";
import complaint from "../views/study/complaint.vue"
import myHelp from "../views/my/myHelp.vue";
import help from "../views/my/help.vue";
import createNews from "../views/home/createNews.vue"
import exchangeCurrency from '../views/my/exchangeCurrency.vue'
import Test from '../views/my/Test.vue'
import aboutUs from '../views/my/aboutUs.vue'
import AddressEdit from "../views/course/AddressEdit.vue";
import Feedback from "../views/course/Feedback.vue";
import systemSettings from '../views/my/systemSettings.vue'
import personalData from '../views/my/personalData.vue'
import playDownload from '../views/my/playDownload.vue'
import accountSecurity from '../views/my/accountSecurity.vue'
import messageReminder from '../views/my/messageReminder.vue'
import bindMobilePhone from '../views/my/bindMobilePhone.vue'
import exam from "../views/home/exam.vue"
import postDetails from "../views/circle/postDetails.vue"
import message from "../views/circle/message.vue"
import addCircleArticle from '../views/circle/addCircleArticle.vue'
import addProblem from "../views/circle/addProblem.vue";
import word from "../views/home/word.vue"
import wordComponent from "../views/home/wordComponent.vue";
import school from "../views/home/school.vue";
import schoolDetails from "../views/home/schoolDetails.vue";
import wordBook from "../views/home/wordBook.vue";
import zhaoshengDetails from "../views/home/zhaoshengDetails.vue";
import wordComponent1 from "../views/home/wordComponent1.vue";
import collectionWord from "../views/home/collectionWord.vue";
import rightQuestions from "../views/home/rightQuestions.vue";
import study from "../views/study/study.vue";
import orderPay from "../views/my/orderPay.vue";
import myLearnMoney from "../views/my/myLearnMoney.vue";
import getLearnMoney from "../views/my/getLearnMoney.vue";
import list from "../views/circle/list.vue"
//  配置路由组

const routes = [
    {
        name:'course',
        path:'/course',
        component:course,
        meta:{
            TabbarShow:true
        }
    },
    {
        name: 'test',
        path: '/test',
        component: Test,
        meta: {
            TabbarShow: false
        }
    },
    {
        name:'bindMobilePhone',
        path:'/bindMobilePhone',
        component:bindMobilePhone,
        meta:{
            TabbarShow:false
        }
    },
    {
        name:'playDownload',
        path:'/playDownload',
        component:playDownload,
        meta:{
            TabbarShow:false
        }
    },
    {
        name:'resetPassword',
        path:'/resetPassword',
        component:resetPassword,
        meta:{
            TabbarShow:false
        }
    },
    {
        name:'myHelp',
        path:'/myHelp',
        component:myHelp,
        meta:{
            TabbarShow:false
        }
    },
    {
        name:'aboutUs',
        path:'/aboutUs',
        component:aboutUs,
        meta:{
            TabbarShow:false
        }
    },
    {
        name:'messageReminder',
        path:'/messageReminder',
        component:messageReminder,
        meta:{
            TabbarShow:false
        }
    },
    {
        name:'personalData',
        path:'/personalData',
        component:personalData,
        meta:{
            TabbarShow:false
        }
    },
    {
        name:'accountSecurity',
        path:'/accountSecurity',
        component:accountSecurity,
        meta:{
            TabbarShow:false
        }
    },
    {//系统设置
        name:'systemSettings',
        path:'/systemSettings',
        component:systemSettings,
        meta:{
            TabbarShow:false
        }
    },
    {//首页模块
        name:'home',
        path:'/home',
        component:home,
        meta:{
            TabbarShow:true
        }
    },
    {//首页模块
        name:'clickInRecord',
        path:'/clickInRecord',
        component:clickInRecord,
        meta:{
            TabbarShow:true
        }
    },
    {//搜索
        name:'search',
        path:'/search',
        component:search,
        meta:{
            TabbarShow:false
        }
    },
    {//打卡页面
        name:'clockIn',
        path:'/clockIn',
        component:clockIn,
        meta:{
            TabbarShow:false
        }
    },
    {//院校
        name:'school',
        path:'/school',
        component:school,
        meta:{
            TabbarShow:false
        }
    },
    {//创建文章
        name:'createArticle',
        path:'/createArticle',
        component:createArticle,
        meta:{
            TabbarShow:true
        }
    },

    {//资讯
        name:'news',
        path:'/news',
        component:news,
        meta:{
            TabbarShow:false
        }
    },
    {//创建资讯
        name: 'createNews',
        path: '/createNews',
        component: createNews,
        meta: {
            TabbarShow: false
        }
    },
    {//资讯详情
        name:'newsDetails',
        path:'/newsDetails/:id',
        component:newsDetails,
        meta:{
            TabbarShow:false
        }
    },
    {//百科
        name:'encyclopedia',
        path:'/encyclopedia',
        component:encyclopedia,
        meta:{
            TabbarShow:false
        }
    },
    {//参考书
        name:'reference',
        path:'/reference',
        component:reference,
        meta:{
            TabbarShow:false
        }
    },
    {//题库
        name:'question',
        path:'/question',
        component:question,
        meta:{
            TabbarShow:false
        }
    },
    {//背单词
        name:'word',
        path:'/word',
        component:word,
        meta:{
            TabbarShow:false
        }
    },

    {//真题库
        name: 'rightQuestions',
        path: '/rightQuestions',
        component: rightQuestions,
        meta: {
            TabbarShow: false
        }
    },
    {//错题本
        name: 'errorQuestions',
        path: '/errorQuestions',
        component: errorQuestions,
        meta: {
            TabbarShow: false
        }
    },
    {//收藏夹
        name: 'collectQuestions',
        path: '/collectQuestions',
        component: collectQuestions,
        meta: {
            TabbarShow: false
        }
    },
    {//模拟考试
        name: 'exam',
        path: '/exam/:id',
        component: exam,
        meta: {
            TabbarShow: false
        }
    },
    {//找资料
        name:'information',
        path:'/information',
        component:information,
        meta:{
            TabbarShow:false
        }
    },
    {//问学长
        name:'look',
        path:'/look',
        component:look,
        meta:{
            TabbarShow:false
        }
    },

    {
        name: 'study',
        path:'/study',
        component:study,
        meta:{
            TabbarShow:true
        }
    },
    {
        path: '/articleDetails/:articleId', // :id 表示动态路由参数，用于传递文章的 ID
        name: 'articleDetails',
        component: articleDetails,
        props: true // 将路由参数作为 props 传递给组件
    },
    {
        name: 'circle',
        path:'/circle',
        component:circle,
        meta:{
            TabbarShow:true
        }
    },
    {
        name: 'my',
        path:'/my',
        component:my,
        meta:{
            TabbarShow:true
        }
    },{
        name: messageList,
        path:'/messageList',
        component:messageList,
        meta:{
            TabbarShow:true
        }
    },{
        name: orderList,
        path:'/orderList',
        component:orderList,
        meta:{
            TabbarShow:true
        }
    },{
        name: myCache,
        path:'/cache',
        component:myCache,
        meta:{
            TabbarShow:true
        }
    },{
        name: orderDetail,
        path:'/orderDetail',
        component:orderDetail,
        meta:{
            TabbarShow:true
        }
    },{
        name: orderListUpdate,
        path:'/orderListUpdate',
        component:orderListUpdate,
        meta:{
            TabbarShow:true
        }
    },{
        name: questionList,
        path:'/questionList',
        component:questionList,
        meta:{
            TabbarShow:true
        }
    },
    {
        path: '/follow',
        name: 'Follow',
        component: followPage,
        meta:{
            TabbarShow:false
        }
    },
    {
        path: '/addTask',
        name: 'addTask',
        component: addTask,
        meta: {
            TabbarShow: false
        }
    },
    {
        path: '/openCourse',
        name: 'openCourse',
        component: OpenCourse,

        meta:{
            TabbarShow:false
        }
    },
    {
        path: '/onlineCourse',
        name: 'onlineCourse',
        component: OnlineCourse,

        meta:{
            TabbarShow:false
        }
    },
    {
        path: '/offlineCourse',
        name: 'offlineCourse',
        component: OfflineCourse,

        meta:{
            TabbarShow:false
        }
    },
    {
        path: '/login',
        name: 'login',
        component: login,

        meta:{
            TabbarShow:false
        }
    },
    {
        path: '/register',
        name: 'register',
        component: register,
        meta:{
            TabbarShow:false
        }
    },
    {
        path: '/myCreate',
        name: 'MyCreate',
        component: myCreate,

        meta:{
            TabbarShow:false
        }
    },
    {
        path: '/myCourse',
        name: 'MyCourse',
        component: myCourse,

        meta:{
            TabbarShow:false
        }
    },
    {
        path: '/myCollect',
        name: 'MyCollect',
        component: myCollect,

        meta:{
            TabbarShow:false
        }
    },
    {
        path: '/dynanic',
        name: 'Dynanic',
        component: dynanic,

        meta:{
            TabbarShow:false
        }
    },
    {
        path: '/browsingHistory',
        name: 'BrowsingHistory',
        component: browsingHistory,

        meta:{
            TabbarShow:false
        }
    },
    {
        path: '/personalHome',
        name: 'PersonalHome',
        component: personalHome,
        meta:{
            TabbarShow:false
        }
    },
    {
        path: '/personalHomeCopy/:userId',
        name: 'PersonalHomeCopy',
        component: personalHomeCopy,
        meta:{
            TabbarShow:false
        }
    },
    {
        path: '/envent',
        name: 'envent',
        component: envent,

        meta:{
            TabbarShow:false
        }
    },
    {
        path: '/project',
        name: 'project',
        component: project,

        meta:{
            TabbarShow:false
        }
    },
    {
        path: '/orderAck',
        name: 'orderAck',
        component: OrderAck,

        meta:{
            TabbarShow:false
        }
    },
    {
        path: '/addressList',
        name: 'addressList',
        component: AddressList,

        meta:{
            TabbarShow:false
        }
    },
    {
        path: '/addressNew',
        name: 'addressNew',
        component: AddressNew,

        meta:{
            TabbarShow:false
        }
    },
    {
        path: '/createArticle',
        name: 'createArticle',
        component: createArticle,
        meta:{
            TabbarShow:false
        }
    },
    {
        path: '/OrderAck',
        name: 'OrderAck',
        component: OrderAck,
        meta:{
            TabbarShow:false
        }
    },
    {
        path: '/AddressNew',
        name: 'AddressNew',
        component: AddressNew,
        meta:{
            TabbarShow:false
        }
    },
    {
        path: '/studentReport',
        name: 'studentReport',
        component: studentReport,
        meta:{
            TabbarShow:false
        }
    },
    {
        path: '/drafts',
        name: 'drafts',
        component: drafts,
        meta: {
            TabbarShow: false
        }
    },
    {
        path: '/helpDetails/:id', // :id 表示动态路由参数，用于传递文章的 ID
        name: 'helpDetails',
        component: helpDetails,
        props: true // 将路由参数作为 props 传递给组件
    },
    {
        path: '/exchangeCurrency',
        name: 'exchangeCurrency',
        component: exchangeCurrency,
        meta: {
            TabbarShow: false
        }
    },
    {

        path: '/addressEdit',
        name: 'addressEdit',
        component: AddressEdit,
        meta: {
            TabbarShow: false
        }
    },
    {
        path: '/feedback',
        name: 'feedback',
        component: Feedback,
        meta:{
            TabbarShow:false
        }
    },

    {
        path: '/wordComponent',
        name: 'wordComponent',
        component: wordComponent,
        meta: {
            TabbarShow: false
        }
    },
    {
        path: '/help',
        name: 'help',
        component: help,
        meta: {
            TabbarShow: false
        }
    },
    {
        path: '/schoolDetails/:schoolName',
        name: 'schoolDetails',
        component: schoolDetails,
        meta: {
            TabbarShow: false
        }
    },


    {
        path: '/complaint/:articleId',
        name: 'complaint',
        component: complaint,
        meta: {
            TabbarShow: false
        }
    },


    {
        path: '/addCircleArticle',
        name: 'addCircleArticle',
        component: addCircleArticle,
        meta: {
            TabbarShow: false
        }
    },
    {
        path: '/addProblem',
        name: 'addProblem',
        component: addProblem,
        meta: {
            TabbarShow: false
        }
    },
    {
        path: '/wordBook',
        name: 'wordBook',
        component: wordBook,
        meta: {
            TabbarShow: false
        }
    },
    {
        path: '/zhaoshengDetails/:schoolName',
        name: 'zhaoshengDetails',
        component: zhaoshengDetails,
        meta: {
            TabbarShow: false
        }
    },
    {
        path: '/postDetails/:id', // :id 表示动态路由参数，用于传递文章的 ID
        name: 'postDetails',
        component: postDetails,
        props: true // 将路由参数作为 props 传递给组件
    },
    {
        path: '/orderPay', // :id 表示动态路由参数，用于传递文章的 ID
        name: 'orderPay',
        component: orderPay,
        props: true // 将路由参数作为 props 传递给组件
    },
    {
        path: '/myLearnMoney', // :id 表示动态路由参数，用于传递文章的 ID
        name: 'myLearnMoney',
        component: myLearnMoney,
        props: true // 将路由参数作为 props 传递给组件
    },
{
        path: '/getLearnMoney', // :id 表示动态路由参数，用于传递文章的 ID
        name: 'getLearnMoney',
        component: getLearnMoney,
        props: true // 将路由参数作为 props 传递给组件
    },




































































    {
        path: '/message',
        name: 'message',
        component: message,
        meta: {
            TabbarShow: false
        }
    },

    {
        path: '/wordComponent1',
        name: 'wordComponent1',
        component: wordComponent1,
        meta: {
            TabbarShow: false
        }
    },
    {
        path: '/collectionWord',
        name: 'collectionWord',
        component: collectionWord,
        meta: {
            TabbarShow: false
        }
    },
    {
        path: '/list',
        name: 'list',
        component: list,
        meta: {
            TabbarShow: false
        }
    },

]



export function createRouter() {
    return _createRouter({
        history: createWebHistory(),
        routes   //绑定路由组 和 路由管理者
    })
}